package com.leyou.auth.service.service;

import com.leyou.auth.inter.pojo.UserInfo;
import com.leyou.common.bean.Result;
import com.leyou.user.inter.dto.UserLoginDTO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author zqq
 * @ClassName AuthService
 * @Description
 * @date 2020/3/4-17:56
 */
public interface AuthService {

    /**
     * @Title: authentication
     * @Description: 登录授权接口
     * @author: zqq
     * @param dto
     * @return: com.leyou.common.bean.Result<java.lang.String>
     * @createTime: 2020-03-09 20:41
     * @version: v.1.0
     */
    Result<String> authentication(UserLoginDTO dto);

    /**
     * @Title: verifyUser
     * @Description: 验证用户并返回信息
     * @author: zqq
     * @param request
     * @param response
     * @return: com.leyou.common.bean.Result<com.leyou.auth.inter.pojo.UserInfo>
     * @createTime: 2020-03-27 20:27
     * @version: v.1.0
     */
    Result<UserInfo> verifyUser(HttpServletRequest request, HttpServletResponse response);

    /**
     * @Title: logout
     * @Description: 注销用户
     * @author: zqq
     * @param request
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-27 20:29
     * @version: v.1.0
     */
    Result logout(HttpServletRequest request);
}
